<div class="full-screen">
    <div class="page-group">
        <div class="page page-current address_pageBOX" style="overflow: auto;">
            <div class="coupon_page_top">
                <a href="javascript:history.back();"><{img class="coupon_top_return" src="images/icon04.png" app="wap"}></a>
                <div class="coupon_top_text">我的订单</div>
            </div>

            <div class="section">
                <div class="col2">
                    <{if $order.payinfo.pay_app_id != '-1'}>
                    <{if ($order.pay_status == '0' || $order.pay_status == '3') && $order.status != 'dead' && $order.status != 'finish'}>
                    <div class="col">
                        <a href="<{link app=b2c ctl=wap_paycenter act=index arg0=$order.order_id}>">
                            更改付款方式
                            <i class="arr right"></i>
                        </a>
                    </div>

                    <div class="col">
                        <{if $order.payinfo.pay_app_id != 'offline'}>
                        <{if $prepare.prepare_type != 'prepare'}>
                        <a href="<{link app=b2c ctl=wap_paycenter act=index arg0=$order.order_id}>">
                            去付款
                            <i class="arr right"></i>
                        </a>
                        <{/if}>
                        <{if $prepare.prepare_type == 'prepare' && $prepare.nowtime > $prepare.begin_time && $prepare.nowtime < $prepare.end_time  && $order.pay_status=='0' && $prepare.status=='true'}>
                        <a href="<{link app=b2c ctl=wap_paycenter act=index arg0=$order.order_id}>">
                            去付订金
                            <i class="arr right"></i>
                        </a>
                        <{/if}>
                        <{if $prepare.prepare_type == 'prepare'&& $prepare.nowtime > $prepare.begin_time && $prepare.nowtime < $prepare.begin_time_final  && $order.pay_status=='3' && $prepare.status=='true'}>
                        等待支付尾款
                        <i class="arr right"></i>
                        <{/if}>
                        <{if $prepare.prepare_type == 'prepare'&& $prepare.nowtime > $prepare.begin_time_final && $prepare.nowtime < $prepare.end_time_final  && $order.pay_status=='3' && $prepare.status=='true'}>
                        支付尾款
                        <i class="arr right"></i>
                        <{/if}>
                        <{if $prepare.prepare_type == 'prepare'&& $prepare.nowtime > $prepare.end_time_final && $prepare.status=='true'}>
                        活动结束
                        <i class="arr right"></i>
                        <{/if}>

                        <{else}>
                        <a href="<{link app=b2c ctl='wap_member' act='add_order_msg' arg0=$order.order_id arg1='1'}>">
                            我已经付款
                            <i class="arr right"></i>
                        </a>
                        <{/if}>
                    </div>
                    <{/if}>
                    <{/if}>
                    <div class="leaves-message">我要留言</div>
                </div>
            </div>


            <!-- 订单留言 -->
            <{if $ordermsg}>
            <div class="section">
                <div class="d-line c-fix">
                    <span class="l-k">订单留言：</span>
                    <{foreach from=$ordermsg item=msgitem name="ordermsg"}>
            <span class="l-v">
            <span class="bold">
            <{$msgitem.title}>:<{$msgitem.time|cdate:FDATE_STIME}>
            </span>
            <br />
            （<{$msgitem.comment|nl2br}>）
            </span>
                    <{/foreach}>
                </div>
            </div>
            <{/if}>


            <div class="section">
                <div class="d-line c-fix">
                    <span class="l-k">订单号：</span>
                    <span class="l-v"><{$order.order_id}></span>

                    <span class="l-k">总金额：</span>
                    <span class="l-v"><{$order.total_amount|cur_odr:$order.currency}></span>

                    <span class="l-k">订单状态：</span>
                    <span class="l-v"><{if $order.status == 'dead'}><{t}>已作废<{/t}><{elseif $order.status == 'finish'}><{t}>已完成<{/t}><{else}><{if $order.pay_status == '0'}><{t}>未付款<{/t}><{elseif $order.pay_status == '1'}><{t}>已支付<{/t}><{elseif $order.pay_status == '2'}><{t}>已付款至担保方<{/t}><{elseif $order.pay_status == '3'}><{t}>部分付款<{/t}><{elseif $order.pay_status == '4'}><{t}>部分退款<{/t}><{else}><{t}>全额退款<{/t}><{/if}> <{if $order.ship_status == '0'}><{t}>[未发货]<{/t}><{elseif $order.ship_status == '1'}><{t}>已发货<{/t}><{elseif $order.ship_status == '2'}><{t}>部分发货<{/t}><{elseif $order.ship_status == '3'}><{t}>部分退货<{/t}><{else}><{t}>已退货<{/t}><{/if}><{/if}></span>

                    <span class="l-k">下单日期：</span>
                    <span class="l-v"><{$order.createtime|cdate}></span>
                </div>
            </div>
            <div class="section">
                <div class="d-line c-fix">
                    <span class="l-k">配送地区：</span>
                    <span class="l-v"><{$order.consignee.area}></span>

                    <span class="l-k">收货地址：</span>
                    <span class="l-v"><{$order.consignee.addr}>,<{$order.consignee.zip}>,<{$order.consignee.name}>,<{if $order.consignee.telephone}><{$order.consignee.telephone}><{if $order.consignee.mobile}> | <{/if}><{/if}><{$order.consignee.mobile}></span>
                </div>
            </div>
            <div class="section">
                <div class="pre ob">
                    <div class="d-line c-fix" id="L_sel_pre">
                        <div class="col2">
                            <div class="col">配送方式：<{$order.shipping.shipping_name}></div>
                            <div class="col">运费<span class="f-red"><{$order.shipping.cost_shipping|cur_odr:$order.currency}></span>元</div>
                            <{if $logi == true &&($order.ship_status == '1' ||$order.ship_status == '2')}>
                            <div class="colt-r"><i class="arr down"></i></div>
                            <{/if}>
                        </div>
                    </div>
                    <div class="pre-info hide" id="L_pre_info">
                        <{if $orderlogs}>
                        <{include file="wap/member/order_logs.html" app="b2c"}>
                        <{/if}>
                    </div>
                </div>
            </div>
            <div class="section">
                <div class="d-line c-fix">
                    <span class="l-k">支付方式：</span>
                    <span class="l-v"><{$order.payinfo.pay_app_id|pay_name}></span>
                </div>
            </div>


            <div class="section">
                <div class="d-line">
                    <span class="k">商品清单：</span>
                </div>
                <{if $prepare.prepare_type != 'prepare'}>
                    <div class="pre ob">
                        <div class="d-line c-fix" id="J_sel_pre">
                            优惠：
                            <span class="pre-list">
                                <{foreach from=$order.order_pmt item=item}>
                                    <span class="icon red">
                                        <{$item.pmt_tag}>
                                    </span>
                                <{/foreach}>
                                <{foreach from=$order.goods_pmt item=item}>
                                    <{foreach from=$item item=goodpro}>
                                        <span class="icon red">
                                            <{$goodpro.pmt_tag}>
                                        </span>
                                    <{/foreach}>
                                <{/foreach}>
                            </span>
                            <i class="arr down"></i>
                        </div>
                        <div class="pre-info hide" id="J_pre_info">
                            <{if count($order.order_pmt)>0}>
                                <div class="pre-type">订单优惠</div>
                                <div class="box">
                                    <{foreach from=$order.order_pmt item=item}>
                                        <span class="col f-red">[<{$item.pmt_tag}>]</span>
                                        <span class="col"><{$item.pmt_describe}></span>
                                    <{/foreach}>
                                </div>
                            <{/if}>
                            <{if count($order.goods_pmt)>0}>
                                <div class="pre-type">商品优惠</div>
                                <div class="box">
                                    <{foreach from=$order.goods_pmt item=item}>
                                        <{foreach from=$item item=goodpro}>
                                            <span class="col f-red">[<{$goodpro.pmt_tag}>]</span>
                                            <span class="col"><{$goodpro.pmt_describe}></span>
                                        <{/foreach}>
                                    <{/foreach}>
                                </div>
                            <{/if}>
                        </div>
                    </div>
                <{/if}>

                <{if count($order.goods_items) > 0}>
                    <{foreach from=$order.goods_items item=goods name="order_items"}>
                        <!-- 商品 -->
                        <{if $goods.product}>
                            <ul class="pt-list">
                                <li class="pt-h-item c-fix">
                                    <a href="<{$goods.product.link_url}>" class="pt-h-link">
                                        <div class="pt-h-img"><img src="<{$goods.product.thumbnail_pic|default:$env.conf.site.default_thumbnail_pic|storager:'s'}>" /></div>
                                        <div class="pt-h-info">
                                            <div class="pt-h-name">
                                                <{$goods.product.name}>
                                            </div>
                                            <div class="pt-h-other">
                                                <{foreach from=$goods.product.minfo item=minfo key=name}>
                                                    <{$minfo.label}>：<{$minfo.value}>
                                                <{/foreach}>
                                                <{if $goods.product.attr}>
                                                    <{$goods.product.attr}>
                                                <{/if}>
                                            </div>
                                            <div class="col2">
                                                <div class="col price">
                                                    <{$goods.product.amount|cur_odr:$order.currency}>
                                                </div>
                                                <div class="col t-r">
                                                    数量：<{$goods.product.quantity}>
                                                </div>
                                            </div>
                                        </div>
                                    </a>
                                </li>
                            </ul>
                        <{/if}>

                        <!-- 配件 -->
                        <{if $goods.adjunct_items}>
                            <{foreach from=$goods.adjunct_items item=ajuncts name="ajunctsItem"}>
                                <ul class="pt-list">
                                    <li class="pt-h-item c-fix">
                                        <a href="<{$ajuncts.link_url}>" class="pt-h-link">
                                            <div class="pt-h-img"><img src="<{$ajuncts.thumbnail_pic|default:$env.conf.site.default_thumbnail_pic|storager:'s'}>" /></div>
                                            <div class="pt-h-info">
                                                <div class="pt-h-name">
                                                    <{$ajuncts.name}>
                                                </div>
                                                <div class="pt-h-other">
                                                    <{foreach from=$ajuncts.minfo item=minfo key=name}>
                                                        <{$minfo.label}>：<{$minfo.value}>
                                                    <{/foreach}>
                                                    <{if $ajuncts.attr}>
                                                        <{$ajuncts.attr}>
                                                    <{/if}>
                                                </div>
                                                <div class="col2">
                                                    <div class="col price">
                                                        <{$ajuncts.amount|cur_odr:$order.currency}>
                                                    </div>
                                                    <div class="col t-r">
                                                        数量：<{$ajuncts.quantity}>
                                                    </div>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                </ul>
                            <{/foreach}>
                        <{/if}>

                        <{if $prepare.prepare_type != 'prepare'}>
                        <!-- 赠送赠品 -->
                            <{if $goods.gift_items}>
                                <{foreach from=$goods.gift_items item=gifts name="giftsItem"}>
                                    <ul class="pt-list">
                                        <li class="pt-h-item c-fix">
                                            <a href="#" class="pt-h-link">
                                                <div class="pt-h-img"><img src="<{$gifts.thumbnail_pic|default:$env.conf.site.default_thumbnail_pic|storager:'s'}>" /></div>
                                                <div class="pt-h-info">
                                                    <div class="pt-h-name">
                                                        <{$gifts.name}>
                                                    </div>
                                                    <div class="pt-h-other">
                                                        <{foreach from=$gifts.minfo item=minfo key=name}>
                                                            <{$minfo.label}>：<{$minfo.value}>
                                                        <{/foreach}>
                                                        <{if $gifts.attr}>
                                                            <{$gifts.attr}>
                                                        <{/if}>
                                                    </div>
                                                    <div class="col2">
                                                        <div class="col price">
                                                            商品赠送
                                                        </div>
                                                        <div class="col t-r">
                                                            数量：<{$gifts.quantity}>
                                                        </div>
                                                    </div>
                                                </div>
                                            </a>
                                        </li>
                                    </ul>
                                <{/foreach}>
                            <{/if}>
                        <{/if}>
                    <{/foreach}>
                <{/if}>


                <{if $prepare.prepare_type != 'prepare'}>
                <!-- 赠品 -->
                    <{if $order.gift_items}>
                        <{foreach from=$order.gift_items item="item" key="key"}>
                            <ul class="pt-list">
                                <li class="pt-h-item c-fix">
                                    <a href="#" class="pt-h-link">
                                        <div class="pt-h-img"><img src="<{$gifts.thumbnail_pic|default:$env.conf.site.default_thumbnail_pic|storager:'s'}>" /></div>
                                        <div class="pt-h-info">
                                            <div class="pt-h-name">
                                                <{$item.name}>
                                            </div>
                                            <div class="pt-h-other">

                                            </div>
                                            <div class="col2">
                                                <div class="col price">
                                                    <{$item.amount|cur_odr:$order.currency}>
                                                </div>
                                                <div class="col t-r">
                                                    数量：<{$item.nums}>
                                                </div>
                                            </div>
                                        </div>
                                    </a>
                                </li>
                            </ul>
                        <{/foreach}>
                    <{/if}>
                <{/if}>

                <!-- 其他 -->
                <{if $order.extends_items}>
                <{if count($order.goods_items) <= 0}>
                <{foreach from=$order.extends_items item="aExtends"}>
                <{$aExtends}>
                <{/foreach}>
                <{/if}>
                <{/if}>
            </div>


            <div class="section">
                <div class="d-line c-fix">
                    <span class="l-k">订单留言：</span>
                    <span class="l-v">
                        <{if $order.memo}>
                        <{$order.memo}>
                        <{else}>
                        无
                        <{/if}>
                    </span>
                </div>
            </div>

            <div class="section">
                <div class="d-line">
                    <span class="k">
                        商品总金额：
                    </span>
                    <span class="v">
                        <div class="price">
                            <{$order.cost_item|cur_odr:$order.currency}>
                        </div>
                    </span>
                </div>
                <div class="d-line">
                    <span class="k">
                        运费：
                    </span>
                    <span class="v">
                        <div class="price">
                            <{$order.shipping.cost_shipping|cur_odr:$order.currency}>
                        </div>
                    </span>
                </div>
                <div class="d-line">
                    <span class="k">
                        订单优惠金额：
                    </span>
                    <span class="v">
                        <div class="price">
                            -<{$order.pmt_order|cur_odr:$order.currency}>
                        </div>
                    </span>
                </div>
                <div class="d-line total">
                    <span class="k">
                        总金额：
                    </span>
                    <span class="v">
                        <div class="price">
                            <{$order.total_amount|cur_odr:$order.currency}>
                        </div>
                    </span>
                </div>
            </div>

        </div>
    </div>

    <div class="popup_box daohuo">
        <form action='<{link app=b2c ctl="wap_member" act="toadd_order_msg"}>' method="post" class="form" data-type="ajax">
            <input type="hidden" name="msg[orderid]" value="<{$order.order_id}>"/>
            <div class="popup_content_box">
                <div class="popup_title">我要留言</div>
                <div class="popup_content">
                    <div class="popup_search">
                        <span>标题 :</span>
                        <input type="text" name="msg[subject]" required="required" style="width: 80%;height: 1.3rem;border-radius: 0.1rem;">
                        <div class="clearfix"></div>
                    </div>
                    <div class="popup_search">
                        <span>内容 :</span>
                        <textarea type="text" name="msg[message]" required="required" rows="6" cols="30" vtype="required" style="border:1px solid #bfbfbf;width: 80%;resize: none;border-radius: 0.1rem;"></textarea>
                        <div class="clearfix"></div>
                    </div>
                    <button type="submit" class="button button-fill button-success popup_button_color" style="width: 90%;margin-left: 5%;line-height: 1.3rem;height: 1.3rem;" rel="_request">提交</button>
                </div>
                <{img class="icon_close" src="images/icon_close.png" app='wap'}>
            </div>
        </form>
    </div>

</div>
<script>
    (function(){
        $('#J_sel_pre').bind('click',function(e){
            $('#J_pre_info').toggleClass('hide');
            $(this).find('.pre-list').toggleClass('hide');
        });
        <{if $order.ship_status == '1' ||$order.ship_status == '2'}>
           $('#L_sel_pre').bind('click',function(e){
               $('#L_pre_info').toggleClass('hide');
            });
        <{/if}>
    })();
    $('.leaves-message').click(function(){
        $('.popup_box').css({
            'display':'block',
            'z-index':65535
        });
    });
   $(".icon_close") .click(function(){
       $(".popup_box").css('display','none');
   })
</script>